package com.xiaoyung.easyisapisdk.feign.api.workflow;

import com.xiaoyung.easyisapisdk.common.base.IdsParam;
import com.xiaoyung.easyisapisdk.common.workflow.entity.ProcdefEntity;
import com.xiaoyung.easyisapisdk.common.workflow.request.ActiveProcdefParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.AsyncStartFlowParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.ProcdefListQueryParam;

import feign.Headers;
import feign.RequestLine;

/**
 * 已部署的流程
 */
/*@Api(tags={"流程定义(已部署流程)"})
@ApiSupport(author = "Martin",order = 3)
@RestController
@RequestMapping(value = "/openapi/procdef")*/
public interface ProcdefApi{

	// xmis 下拉框用
	/*@ApiOperation(value = "查询最新版流程定义列表")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@GetMapping(value = "/listLatest")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procdef/listLatest")
	public ProcdefEntity listLatest()  ;

	/**
	 * 查询已部署流程列表
	 */
	/*@ApiOperation(value = "查询已流程定义列表")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "pageNum", value = "页码", dataTypeClass = Integer.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "pageSize", value = "页面大小", dataTypeClass = Integer.class, paramType = "query", required = false)
	})
	@GetMapping(value = "/list")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procdef/list")
	public ProcdefEntity list(ProcdefListQueryParam req);


	/**
	 * 
	 * 启用/禁用 流程定义
	 */
	/*@ApiOperation(value = "启用/禁用 流程定义")
	@ApiOperationSupport(order = 3, includeParameters = {})
	@PostMapping(value = "/actived")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procdef/actived")
	public Void actived(ActiveProcdefParam req);

	/**
	 * 删除
	 */
	/*@ApiOperation(value = "删除 流程定义")
	@ApiOperationSupport(order = 4, includeParameters = {})
	@PostMapping("/delete")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procdef/delete")
	public Void delete(IdsParam req);

	/*@ApiOperation(value = "异步启动流程")
	@ApiOperationSupport(order = 5, includeParameters = {})
	@PostMapping(value = "/asyncStart")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/procdef/asyncStart")
	public Void asyncStart(AsyncStartFlowParam req);

}
